package cc.vicp.djx314.msing.web.test;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import cc.vicp.djx314.msing.web.base.BaseAction;
import cc.vicp.djx314.msing.web.form.ListTestForm;

public class ListTestAction extends BaseAction {
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
					throws Exception {
		ListTestForm listTestForm = (ListTestForm) form;
		List accounts = listTestForm.getAccounts();
		String name = listTestForm.getName();
		request.setAttribute("accounts", accounts);
		request.setAttribute("name", name);
		return mapping.findForward("success");
	}
}